﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Member/MerchantMaster.master" AutoEventWireup="true"
    CodeFile="Shop_NewsAdd.aspx.cs" Inherits="Member_Shop_NewsAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="bz_keen right">
        <div class="grxixn b">
            <div class="xixzhil">
                <a href="Shop_News.aspx">
                    <h2 class="xit">
                        新闻管理/发布</h2>
                </a>
            </div>
            <div class="blank">
            </div>
            <div class="xinxifabu">
                <form>
                <div>
                    <span class="left">新闻类别：</span>
                    <asp:DropDownList ID="ddlType" runat="server" Width="80px">
                        <asp:ListItem Text="行业新闻" Value="1" />
                    </asp:DropDownList>
                </div>
                <div>
                    <span class="left">新闻标题：</span>
                    <asp:TextBox ID="txtTitle" CssClass="inpt1" runat="server" Width="200"></asp:TextBox>
                    <span class="red">*</span>
                </div>
                <div>
                    <span class="left">新闻来源：</span>
                    <asp:TextBox ID="txtSource" CssClass="inpt1" runat="server" Width="60"></asp:TextBox>
                </div>
                <div>
                    <span class="left">新闻内容：</span></div>
                <div>
                    <asp:TextBox runat="server" CssClass="txt2" ID="txtContext" TextMode="MultiLine" />
                </div>
                <div class="blank">
                </div>
                <div align="center">
                    <asp:ImageButton ID="ibtn" runat="server" ImageUrl="../images/dz_a3.jpg" OnClick="ibtn_Click"
                        OnClientClick="return Check()" />
                    <asp:ImageButton ID="ibtnUpdate" runat="server" ImageUrl="../images/tijiao.jpg"
                        OnClick="ibtnUpdate_Click" OnClientClick="return Check()" /><asp:HiddenField ID="HdnewsID"
                            runat="server" />
                </div>
                </form>
            </div>
        </div>
    </div>
    <script language="javascript" type="text/javascript">
        KindEditor.ready(function (K) {
            var editor1 = K.create('#<%=txtContext.ClientID %>', {
                items: [
        		                'source', '|', 'undo', 'redo', '|', 'preview', 'code', 'cut', 'copy', 'paste',
        		                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
        		                'justifyfull', 'insertorderedlist', 'insertunorderedlist',
        		                '|', 'fullscreen', '/',
        		                'fontname', 'fontsize', '|', 'forecolor', 'bold',
        		                'italic', 'underline', 'lineheight', '|', 'image', 'multiimage',
        		                'flash', 'media', 'table', 'baidumap',
        		                'link', 'unlink'
        	            ],
                pasteType: 1,
                cssPath: 'CKEdit/kindedit/plugins/code/prettify.css',
                uploadJson: 'CKEdit/kindedit/asp.net/upload_json.ashx',
                fileManagerJson: 'CKEdit/kindedit/asp.net/file_manager_json.ashx',
                allowFileManager: true
            });
            prettyPrint();
        });
        $().ready(function () {
            $("#lm5,#lm51").addClass("red");
        });

        function Check() {
            var ErrorNum = 0;
            var ErrorInfo = '请填写以下内容:\r\n';
            if ($('#<%=txtTitle.ClientID %>').val() == "") {
                ErrorNum++;
                ErrorInfo += ErrorNum + '. 新闻标题不能为空.\r\n';
            }

            //            if ($('#<%=txtContext.ClientID %>').val() == "") {
            //                ErrorNum++;
            //                ErrorInfo += ErrorNum + '. 新闻内容不能为空.\r\n';
            //            }
            if (ErrorNum == 0) {
                return true;
            } else {
                alert(ErrorInfo);
                return false;
            }
        }
    </script>
</asp:Content>
